import { defineStore } from 'pinia'
import { reactive, ref } from 'vue'


export const usestore = defineStore('homestore', () => {

    let username = ref('')

    let identity = ref(0)

    username.value = localStorage.getItem('username') || ''

    identity.value = parseInt(localStorage.getItem('identity') || '')

    const user = reactive({
        userId: 0,
        username: '',
        userPassword: '',
        sex: '',
        userEmail: ''
    })

    const token = ref('')


    return { identity, token ,username,user}
})




